package org.glickr.api.places

import org.glickr.api.FlickrApiMethod
import groovy.util.slurpersupport.GPathResult

/* ----------------------------------------------------------------------------------------------------
REQUEST: flickr.places.placesForUser
INFO: Return a list of the top 100 unique places clustered by a given placetype for a user.

AUTHENTICATION: This method requires authentication with 'read' permission.

ARGUMENTS:
api_key (Required): Your API application key.
place_type_id (Optional): The numeric ID for a specific place type to cluster photos by.
Valid place type IDs are :
-22: neighbourhood
-7: locality
-8: region
-12: country
-29: continent

The "place_type" argument has been deprecated in favor of the "place_type_id" argument. It won't go away but it will not be added to new methods. A complete list of place type IDs is available using the flickr.places.getPlaceTypes method. (While optional, you must pass either a valid place type or place type ID.)
place_type (Optional): A specific place type to cluster photos by.
Valid place types are :
-neighbourhood (and neighborhood)
-locality
-region
-country
-continent
(While optional, you must pass either a valid place type or place type ID.)
woe_id (Optional): A Where on Earth identifier to use to filter photo clusters. For example all the photos clustered by locality in the United States (WOE ID 23424977).
(While optional, you must pass either a valid Places ID or a WOE ID.)
place_id (Optional): A Flickr Places identifier to use to filter photo clusters. For example all the photos clustered by locality in the United States (Place ID 4KO02SibApitvSBieQ).
(While optional, you must pass either a valid Places ID or a WOE ID.)
threshold (Optional): The minimum number of photos that a place type must have to be included. If the number of photos is lowered then the parent place type for that place will be used.
For example if you only have 3 photos taken in the locality of Montreal (WOE ID 3534) but your threshold is set to 5 then those photos will be "rolled up" and included instead with a place record for the region of Quebec (WOE ID 2344924).
min_upload_date (Optional): Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date should be in the form of a unix timestamp.
max_upload_date (Optional): Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date should be in the form of a unix timestamp.
min_taken_date (Optional): Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date should be in the form of a mysql datetime.
max_taken_date (Optional): Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date should be in the form of a mysql datetime.

EXAMPLE RESPONSE:
<places total="1">
  <place place_id="kH8dLOubBZRvX_YZ" woeid="2487956" latitude="37.779" longitude="-122.420" place_url="/United+States/California/San+Francisco" place_type="locality" photo_count="156">San Francisco, California</place>
</places>
---------------------------------------------------------------------------------------------------- */

class placesPlacesForUser implements FlickrApiMethod {
    //
    //  API METHOD
    //
    static final String apiMethod = 'flickr.places.placesForUser'

    //
    //  VALIDATOR
    //

    //
    //  PARAMS
    //

    //
    //  PROCESSOR
    //

    //
    //  ERROR CODES
    //
}